<?php

include FCPATH . 'application/controllers/frontend.php';

class Home extends Frontend {

    public function __construct() {
	parent::__construct();
    }

    public function index() {
	//取五条新闻
	$data = array(
	    'joco_trends' => $this->entry_model->simple_records(3, 0, array(array('type', TYPE_JOCO_TRENDS))),
	    'industry_trends' => $this->entry_model->simple_records(2, 0, array(array('type', TYPE_INDUSTRY_TRENDS)))
	);
	
        $data['home_top_news_type'] = $this->setting_model->find_by_key('home_top_news_type');
        
	$simple_contact = $this->setting_model->find_by_key('simple_contact');
	$data['simple_contact'] = json_decode($simple_contact);

	$this->load->model('banner_model');
	$data['banners'] = $this->banner_model->records();
	
	unset($this->banner_model,$this->setting_model,$this->entry_model);

	$this->load_stylesheets('_z_circulate_show');
	
	$this->load_javascripts('frontend_home');

	$this->rend('frontend/home_index_view', $data);
    }

}
